import request from '@/utils/request'

// 查询单词管理列表
export function listWords(data) {
  return request({
    url: '/thesaurus/words/list',
    method: 'post',
    data: data
  })
}

// 查询单词管理详细
export function getWords(id) {
  return request({
    url: '/thesaurus/words/' + id,
    method: 'get'
  })
}


// 删除单词管理
export function delWords(id) {
  return request({
    url: '/thesaurus/words/remove/' + id,
    method: 'post'
  })
}
// 单词上线管理
export function online(id) {
  return request({
    url: '/thesaurus/words/online/' + id,
    method: 'post'
  })
}

// 单词下线管理
export function offline(id) {
  return request({
    url: '/thesaurus/words/offline/' + id,
    method: 'post'
  })
}
//删除单词词性
export function deleWordSpeechTag(id){
  return request({
    url: '/thesaurus/words/deleteAttrData/' + id,
    method: 'get'
  })
}

//全部保存单词
export function allSaveWords(data) {
  return request({
    url: '/thesaurus/words/allSaveWords',
    method: 'post',
    data: data,
    headers: {
          'Content-Type': 'multipart/form-data'
    },
    timeout: 3600000
  })
}
